package designPattern.action11.stage.c20t7.concrete;

import javax.swing.ImageIcon;

import designPattern.action11.stage.c20t7.sketch.AutoCoffeeMachine;
import designPattern.action11.stage.c20t7.sketch.State;

public class HaveNotCaffee extends State {
    AutoCoffeeMachine machine;

    public   HaveNotCaffee(AutoCoffeeMachine machine) {
        this.machine = machine;
    }

    public void giveAnCupCaffee() {
        machine.messShowing.setIcon(new ImageIcon("/home/whcc/Disk1T/AllProjects/whccsvn/code/project/module/japp_DesigningPatten2/src/main/java/designPattern/action11/chapter20_stage/chapter20_7/res/no.jpg"));
        machine.putInCoin.setEnabled(false);
        machine.getCaffee.setEnabled(false);
        showMessage();
    }

    public void showMessage() {
        machine.messShowing.setText("目前机器中没有咖啡");
    }
}  


